home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Plus / Multimedia Plus with ClearVue Version 10-94 (Knowledge Media Inc.).ISO / dos / fractal / vifs / vifs.doc < prev    next >
Text File  |  1989-09-24  |  9KB  |  276 lines

  1.  
  2.  
  3.  
  4.     VIFS  --  View an Iterated Function System.
  5.     -------------------------------------------
  6.  
  7. Hardware requirements:
  8.  
  9.     IBM PC compatible with EGA and a mouse (only for editing).
  10.     Free memory needed > 128 kByte.
  11.     (A PC/AT or faster is nice but not necessary.)
  12.  
  13.  
  14. [Theory from M. Barnsley 'Fractals Everywhere' (ISBN 0-12-079062-9).]
  15.  
  16. An iterated function system (IFS) can be used to describe a fractal.
  17. The IFSs used by the VIFS program consists of a number of transformations.
  18. The transformations are affine, i.e. they map a point (x, y) to a point
  19. (ax + by + e, cx + dy + f). The constants a, b, c, d, e and f define
  20. the transformation. (a, b, c and d makes a transformation matrix,
  21. e and f a translation vector.)
  22.  
  23. VIFS uses the Random Iteration Algoritm the compute the fractal from the IFS.
  24. It also possible to edit the transformations (if your PC has a mouse).
  25. (The IFS description is stored in a plain ASCII file so a text editor
  26. will also do, but it is a bit harder to visualize what you are doing.)
  27.  
  28.  
  29. Invocation syntax:
  30.  
  31.     VIFS [options] ifs_data_file
  32.  
  33. Options are:
  34.  
  35.     -e        use edit mode (mouse required)
  36.  
  37.  
  38. If the -e option isn't present VIFS displays the fractal. Since this
  39. may take some time the keyboard is scanned, and a pressed key will stop
  40. the computation. A beep signals that the computation has stopped.
  41. After this, a keypress will clear the screen and end the program.
  42.  
  43. If the -e option is present VIFS goes to edit mode. The menu is displayed
  44. at the top of the screen and the transformations all over the screen.
  45. The mouse cursor looks like a +. To select from the menu, point at the
  46. item and click the left button.
  47.  
  48. The transformations are displayed as rectangles with an extra line from
  49. the zero corner pointing along the x axis. The rectangle shows how the
  50. unit square is transformed by the transformation.
  51.  
  52. To select a transformation: point close to the zero corner and click the
  53. left or the right button. The left button selects for move or scale and
  54. the right button selects for rotate or skew. When a transformation is
  55. selected it will remain so until the left button is clicked. To flip edit
  56. mode while a transformation is selected click the right button.
  57.  
  58. Each transformation has an associated color and probability. The color
  59. determines the color of the part of the fractal that the transformation
  60. is responsible for. The color is also the color of the transformation
  61. rectangle when edited. The probability determines the "weight" of the
  62. transformation relative to the other transformations. A high probability
  63. gives more pixels when the fractal is displayed.
  64.  
  65. Every transformation also belongs to a group. Each group defines a
  66. separate IFS, i.e. there will be as many fractals as groups. All fractals
  67. are displayed concurrently.
  68.  
  69. The display of the fractal(s) may be done in invariant measure mode.
  70. In this mode the colors are not determined by the individual transformation's
  71. color, but by the "density" of the parts of the fractal. (The color of a
  72. pixel is increased every time it is hit by the iteration.)
  73.  
  74. The main menu items:
  75.  
  76.     quit        exit the program (don't forget to save the IFS first)
  77.  
  78.     go         display the fractal
  79.  
  80.     unit        draw the unit square (handy if you have zoomed away)
  81.  
  82.     im-mode        invariant measure mode flip on/off
  83.             (also in the color menu)
  84.  
  85.     color        show the color menu (see below)
  86.  
  87.     prob.        show the probability menu (see below)
  88.  
  89.         add        add a transformation
  90.  
  91.     del        delete a transformation
  92.  
  93.     zoom-in        zoom in, show the part of the screen to be enlarged
  94.             to fill the screen; flip mode from move to scale
  95.             exactly as with a transformation
  96.  
  97.     back-out    back out, the reverse of zoom-in; show where the
  98.             current full screen should be shown
  99.  
  100.     redraw         redraw the screen (erase fractals)
  101.  
  102.     load        read an IFS from file
  103.  
  104.     save        write the IFS to file
  105.  
  106.     0        reset the IFS 
  107.  
  108.  
  109. When the color menu is shown (and im mode is off) and a transformation
  110. is selected, its color index and the color is shown in the upper right
  111. corner. Many transformations may have the same color index, which is
  112. necessary if there are more transformations than colors.
  113.  
  114. If a transformation has "previous" color it will not give the fractal
  115. a specific color but use the colors of the other transformations.
  116.  
  117. The color menu items:
  118.  
  119.     quit        return to the main menu
  120.  
  121.     im        invariant measure mode flip on/off
  122.             (also in the main menu)
  123.  
  124.     Max_im+        increase the maximum im color
  125.  
  126.     max_im-        decrease the maximum im color
  127.  
  128.     _bg        select the background for color change
  129.  
  130.     prev        use previous color for this transformation
  131.  
  132.     +index        increase color index
  133.  
  134.     -index        decrease color index
  135.  
  136.     R+ G+ B+    increase the red, green or blue color content
  137.  
  138.     r- g- b-    decrease the red, green or blue color content
  139.  
  140.  
  141. When the probability menu is shown and a transformation is selected,
  142. its probability (within the group) and the group probability is shown in
  143. the upper right corner.
  144.  
  145. The probability menu items:
  146.  
  147.     quit        return to the main menu
  148.  
  149.     density        overall density, in parts of available pixels
  150.  
  151.     equal        set all probabilities equal
  152.  
  153.     =area        set all probabilities proportional to the area
  154.             of each transformation's area
  155.  
  156.     Grp#+        increase the group index of current transformation
  157.  
  158.     grp#-        decrease the group index of current transformation
  159.  
  160.     Prgrp+        increase the probability of current group
  161.  
  162.     prgrp-        decrease the probability of current group
  163.  
  164.     0.1        set the probability of current transformation to .1
  165.  
  166.     .5        set the probability of current transformation to .5
  167.  
  168.     +        increase the  probability of current transformation
  169.  
  170.     -         increase the  probability of current transformation
  171.  
  172.  
  173. Example:
  174.  
  175.     To see the fractal defined by an IFS file "leaf2.ifs" enter
  176.     vifs leaf2.ifs   (at the DOS command prompter).
  177.  
  178.  
  179.  
  180.     Support programs for making hardcopys
  181.     -------------------------------------
  182.  
  183. One way of making a hardcopy is to use a "screen grabber" program to
  184. save the screen content into a file and then print it. A disadvantage
  185. with this is that most printers have higher graphic resolution than
  186. the computer screen and the picture looks grainy.
  187.  
  188. Another way to make a hardcopy is the BIFS program. BIFS draws the
  189. fractal off-screen. The output is a binary (black and white) image
  190. file in SBIF format (Simple Binary Image Format). The resolution is
  191. only limited by available memory (don't use too many TSRs).
  192.  
  193. To print the SBIF file convert it to epson or postscript format with
  194. SBIFEPS or SBIFPS. There also is a program named VSBIF that displays
  195. (part of) a SBIF file on the screen.
  196.  
  197. The SBIFEPS program assumes you have an 8-pin epson printer. It uses
  198. 60 dots/inch (esc-K). If you have problems printing the output file from
  199. SBIFEPS use the -b option to send the output to LPT1. (The DOS print
  200. command usually can't handle binary files.)
  201.  
  202. The SBIFPS output file is a postscript program and you can use your
  203. favorite text editor to modify it (e.g. the image size). If you set
  204. the -b flag the image will be inverted (uses lots of toner).
  205.  
  206.  
  207.  
  208. Invocation syntax for BIFS:
  209.  
  210.     BIFS [options] ifs_data_file
  211.  
  212. Options are:
  213.  
  214.     -o file        output file name (default is standard output)
  215.     -x integer    x size (default 512)
  216.     -y integer    y size (default 512)
  217.     -s integer    x and y size (shorthand for square output)
  218.     -r number    relative density (multiplier for the file value)
  219.     -i        don't reduce the density if im mode (1/im_levels)
  220.     -q        quiet mode, don't stop at keyboard input
  221.  
  222.  
  223.  
  224. Invocation syntax for VSBIF:
  225.  
  226.     VSBIF [options] sbif_file
  227.  
  228. Options are:
  229.  
  230.     -x integer    x offset
  231.     -y integer    y offset
  232.  
  233.  
  234.  
  235. Invocation syntax for SBIFEPS:
  236.  
  237.     SBIFEPS [options] sbif_file
  238.  
  239. Options are:
  240.  
  241.     -o file        output file name (default is standard output)
  242.     -b        use bios to print (on LPT1:)
  243.     -i integer    indent amount (characters)
  244.     -x integer    x offset
  245.     -y integer    y offset
  246.  
  247.  
  248.  
  249. Invocation syntax for SBIFPS:
  250.  
  251.     SBIFPS [options] sbif_file
  252.  
  253. Options are:
  254.  
  255.     -o file        output file name (default is standard output)
  256.     -b        make the background black (inverse)
  257.     -s        square image output (default: fill the paper)
  258.  
  259.  
  260.  
  261. Examples:
  262.  
  263.     Printing the "leaf2.ifs" fractal.
  264.  
  265.     Generate the SBIF file:  bifs leaf2.ifs -o leaf2.sbi
  266.     Check before printing:   vsbif leaf2.sbi
  267.     Print on LPT1 (epson):     sbifeps -b leaf2.sbi
  268.     
  269.     Make a larger file for a postscript printer and reduce density:
  270.     bifs -o leaf2.sbi  -s 1200  -r 0.3  leaf.ifs
  271.  
  272.     Check the right edge before printing:  vsbif -x 1000 leaf2.sbi
  273.     Make the postscript file:  sbifps -o leaf2.ps leaf2.sbi
  274.  
  275.  
  276.